<div id="carousel-example-generic_<?php echo $this->type?>" class="carousel slide" data-ride="carousel" data-interval="<?php echo $this->ms;?>">  
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <?php for($i = 0;$i < count($this->newsModel);$i++):?>
        <?php if($i == 0):?>
        <li data-target="#carousel-example-generic_<?php echo $this->type?>" data-slide-to="<?php echo $i;?>" class="active"></li>
        <?php else:?>
        <li data-target="#carousel-example-generic_<?php echo $this->type?>" data-slide-to="<?php echo $i;?>"></li>
        <?php endif;?>
    <?php endfor;?>
 </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner">
    <?php for($i = 0;$i < count($this->newsModel);$i++):?>
        <?php if($i == 0):?>
        <div class="item active">
            <a href="<?php echo yii::app()->baseUrl.'/display/news/'.$this->newsModel[$i]->news_id;?>">
            <img src="<?php echo CHtml::encode($this->newsModel[$i]->url);?>" width="100%" height=<?php echo $this->height?>  alt="show image">
                    <div class="carousel-caption">
                        <h4><?php echo CHtml::encode($this->newsModel[$i]->title);?></h4>
                    </div>
                </img>
            </a>
        </div>
        <?php else:?>
        <div class="item">
            <a href="<?php echo yii::app()->baseUrl.'/display/news/'.$this->newsModel[$i]->news_id;?>">
                <img src="<?php echo CHtml::encode($this->newsModel[$i]->url);?>" width="100%" height=<?php echo $this->height?>  alt="show image">
                    <div class="carousel-caption">
                        <h4><?php echo CHtml::encode($this->newsModel[$i]->title);?></h4>
                    </div>
                </img>
            </a>
        </div>
        <?php endif;?>
    <?php endfor;?>
 </div>
 <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic_<?php echo $this->type?>" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left"></span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic_<?php echo $this->type?>" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right"></span>
  </a>
</div>
